﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Lifetime;
using System.ComponentModel;

namespace Dtf.Core.Remoting
{
    public class RemotingObject : MarshalByRefObject
    {

        //[EditorBrowsableAttribute(EditorBrowsableState.Advanced)]
        //public override ObjRef CreateObjRef(Type requestedType)
        //{
        //    return base.CreateObjRef(requestedType);
        //}

        //[EditorBrowsableAttribute(EditorBrowsableState.Advanced)]
        //new public object GetLifetimeService()
        //{
        //    return base.GetLifetimeService();
        //}

        //[EditorBrowsableAttribute(EditorBrowsableState.Never)]
        //public override object InitializeLifetimeService()
        //{
        //    ILease lease = base.InitializeLifetimeService() as ILease;
        //    if (lease.CurrentState == LeaseState.Initial)
        //    {
        //        string name = AppDomain.CurrentDomain.FriendlyName; //CLEANUP
        //        Sponsor sponsor = AppDomain.CurrentDomain.GetData("Sponsor") as Sponsor;
                
        //        lease.Register(sponsor);
        //    }
        //    return lease;
        //}

        

        
    }
}
